home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #4
/
Amiga Plus CD - 2000 - No. 4.iso
/
Tools
/
Text
/
HTML
/
HTMLEXT
/
GUI
/
func.upload
< prev
next >
Wrap
Text File
|
2000-04-19
|
10KB
|
319 lines
G4C
; $VER: func.upload Rev.017 © by Juan Manuel Wehrli 1999 - 2000
WINBIG -1 -1 250 60 "Uploader"
WinType 11010000
WinBackground IMAGE BG 0
Winout "NIL:"
WinOnMouse 250 75
xOnLoad
SetGad #This 666 ON
lvuse HTMLEXT 1
EXTRACT %SiteDfue CLEAN Sitedfue
if $Sitedfue = "EIN"
CLI 'rx $*TCP ISONLINE $*TCPIF'
if $.htmlext.tmp = "0"
EZREQ "Zur Zeit besteht keine DFÜ Verbindung!\nSoll die DFÜ Verbindung hergestellt werden?" "_1 Ja weiter|_2 Nein" olreq
if $olreq = 1
GuiLoad "HTMLEXT:gui/func.dfue"
endif
endif
endif
GuiOpen #This
Text 0 0 180 20 "Keine Aktivität ..." 30 BOX
GadFont "xHelvetica.font" "11" 000
GadID 1
Text 0 20 180 20 "Keine Aktivität ..." 30 BOX
GadFont "xHelvetica.font" "11" 000
GadID 2
Text 0 40 110 20 "Keine Aktivität ..." 30 BOX
GadFont "xHelvetica.font" "11" 000
GadID 3
xButton 180 0 70 20 "_1 FTP Work"
GadFont "xHelvetica.font" "11" 000
GadKey "x"
GuiWindow HTMLEXT WAIT
GuiWindow #This WAIT
SetVar stand "1"
lvuse HTMLEXT 1
EXTRACT %SitePath CLEAN slpath
EXTRACT %SiteFTPWRK CLEAN sfpath
EXTRACT %SiteServTyp CLEAN servertyp
LVUSE HTMLEXT 3
LVMulti First
while $$lv.line > ""
SetVar lokdir $$lv.dir
SetVar ftpdir $lokdir
RepVar ftpdir $slpath $sfpath CI
JoinFile $$lv.dir $$lv.rec lokfile
SetVar ftpfile $lokfile
repvar ftpfile $slpath $sfpath CI
if $ftpfile != $lokfile
if $lokfile != ""
if $servertyp = "EIN"
INFO FILE $lokfile
if $$FILE.TYPE != "DIR"
Update Infobar 1 "Lösche Datei $ftpfile ..."
Update #This 1 "($stand) $$lv.rec"
CLI 'delete $ftpfile'
Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
CLI 'copy $lokfile TO $ftpfile'
else
Update Infobar 1 "Lösche Verzeichnis $ftpfile ..."
Update #This 1 "($stand)D $$lv.rec"
EXTRACT lokdir FILE dirn
CLI 'delete $ftpfile ALL'
Update Infobar 1 "Erzeuge $dirn in $ftpdir ..."
cli 'makedir $ftpdir $dirn'
Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
cli 'copy $lokfile TO $ftpfile ALL NOREQ'
endif
else
INFO FILE $lokfile
if $$FILE.TYPE != "DIR"
Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
Update #This 1 "($stand) $$lv.rec"
CLI 'copy $lokfile TO $ftpfile'
else
EXTRACT lokdir FILE dirn
Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
Update #This 1 "($stand)D $$lv.rec"
cli 'makedir $ftpdir $dirn'
cli 'copy $lokfile TO $ftpfile ALL NOREQ'
endif
endif
setvar stat 1
elseif $lokfile = ""
setvar stat 0
endif
else
Update #This 1 "FTPAdresse stimmt nicht!"
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
STOP
endif
LVMulti OFF
LVMulti Show
LVMulti First
Counter stand INC 1
endwhile
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
if $stat = 1
Update "infobar" 1 "Upload erfolgreich durchgeführt."
else
Update "infobar" 1 "Upload konnte nicht durchgeführt werden!"
endif
GuiQuit #This
xButton 180 20 70 20 "_2 FTP OL "
GadFont "xHelvetica.font" "11" 000
GadKey "x"
GuiWindow HTMLEXT WAIT
GuiWindow #This WAIT
SetVar stand "1"
lvuse HTMLEXT 1
EXTRACT %SitePath CLEAN slpath
EXTRACT %SiteFTPOL CLEAN sfpath
EXTRACT %SiteServTyp CLEAN servertyp
LVUSE HTMLEXT 3
LVMulti First
while $$lv.line > ""
SetVar lokdir $$lv.dir
SetVar ftpdir $lokdir
RepVar ftpdir $slpath $sfpath CI
JoinFile $$lv.dir $$lv.rec lokfile
SetVar ftpfile $lokfile
repvar ftpfile $slpath $sfpath CI
if $ftpfile != $lokfile
if $lokfile != ""
if $servertyp = "EIN"
INFO FILE $lokfile
if $$FILE.TYPE != "DIR"
Update Infobar 1 "Lösche Datei $ftpfile ..."
Update #This 2 "($stand) $$lv.rec"
CLI 'delete $ftpfile'
Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
CLI 'copy $lokfile TO $ftpfile'
else
Update Infobar 1 "Lösche Verzeichnis $ftpfile ..."
Update #This 2 "($stand)D $$lv.rec"
EXTRACT lokdir FILE dirn
CLI 'delete $ftpfile ALL'
Update Infobar 1 "Erzeuge $dirn in $ftpdir ..."
cli 'makedir $ftpdir $dirn'
Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
cli 'copy $lokfile TO $ftpfile ALL NOREQ'
endif
else
INFO FILE $lokfile
if $$FILE.TYPE != "DIR"
Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
Update #This 2 "($stand) $$lv.rec"
CLI 'copy $lokfile TO $ftpfile'
else
EXTRACT lokdir FILE dirn
Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
Update #This 2 "($stand)D $$lv.rec"
cli 'makedir $ftpdir $dirn'
cli 'copy $lokfile TO $ftpfile ALL NOREQ'
endif
endif
setvar stat 1
elseif $lokfile = ""
setvar stat 0
endif
else
Update #This 2 "FTPAdresse stimmt nicht!"
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
STOP
endif
LVMulti OFF
LVMulti Show
LVMulti First
Counter stand INC 1
endwhile
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
if $stat = 1
Update "infobar" 1 "Upload erfolgreich durchgeführt."
else
Update "infobar" 1 "Upload konnte nicht durchgeführt werden!"
endif
GuiQuit #This
xButton 110 40 70 20 "_3 Download (vOL)"
GadID 666
GadFont "xHelvetica.font" "11" 000
GadKey "x"
GuiWindow HTMLEXT WAIT
GuiWindow #This WAIT
SetVar stand "1"
lvuse HTMLEXT 1
EXTRACT %SitePath CLEAN slpath
EXTRACT %SiteFTPOL CLEAN sfpath
LVUSE HTMLEXT 3
LVMulti First
while $$lv.line > ""
SetVar lokdir $$lv.dir
SetVar ftpdir $lokdir
RepVar ftpdir $slpath $sfpath CI
JoinFile $$lv.dir $$lv.rec lokfile
SetVar ftpfile $lokfile
repvar ftpfile $slpath $sfpath CI
if $ftpfile != $lokfile
if $lokfile != ""
INFO FILE $lokfile
if $$FILE.TYPE != "DIR"
Update Infobar 1 "Kopiere Datei $ftpfile nach $lokfile ..."
Update #This 2 "($stand) $$lv.rec"
CLI 'copy $ftpfile TO $lokfile'
else
EXTRACT lokdir FILE dirn
Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
Update #This 2 "($stand)D $$lv.rec"
cli 'copy $ftpfile TO $lokfile ALL NOREQ'
endif
setvar stat 1
elseif $lokfile = ""
setvar stat 0
endif
else
Update #This 2 "FTPAdresse stimmt nicht!"
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
STOP
endif
LVMulti OFF
LVMulti Show
LVMulti First
Counter stand INC 1
endwhile
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
if $stat = 1
Update "infobar" 1 "Download erfolgreich durchgeführt."
else
Update "infobar" 1 "Download konnte nicht durchgeführt werden!"
endif
GuiQuit #This
GuiWindow HTMLEXT WAIT
GuiWindow #This WAIT
SetVar stand "0"
lvuse HTMLEXT 1
EXTRACT %SitePath CLEAN spath
EXTRACT %SiteFTPOL CLEAN fpath
EXTRACT %SiteServTyp CLEAN servertyp
LVUSE HTMLEXT 3
LVMulti First
while $$lv.line > ""
JoinFile $$lv.dir $$lv.rec lokfile
ftpfile = $lokfile
repvar ftpfile "$lokdir" "$ftpol" CI
if $lokfile != ""
if $ftpfile != $lokfile
Update #This 3 "($stand) $$lv.rec"
Update Infobar 1 "Kopiere Datei $ftpfile vom Online FTP Server nach $lokfile ..."
CLI 'copy $ftpfile TO $lokfile'
else
Update #This 3 "ACHTUNG: Lokdir = FTPDir!!"
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
STOP
endif
setvar stat 1
else
setvar stat 0
endif
LVMulti OFF
LVMulti Show
LVMulti First
Counter stand INC 1
endwhile
if $stat = 1
Update "infobar" 1 "Download erfolgreich durchgeführt."
else
Update "infobar" 1 "Download konnte nicht durchgeführt werden!"
endif
GuiWindow HTMLEXT RESUME
GuiWindow #This RESUME
GuiQuit #This
xButton 180 40 70 20 "[_X] Abbrechen"
GadFont "xHelvetica.font" "11" 000
GadKey "x"
GuiQuit #This